﻿/*
* LuaHelper.h
*
* lua辅助类
*
* create date: 2014.4.18
* create by: leo
*
*/

#ifndef _LUAHELPER_H_
#define _LUAHELPER_H_

#include "cocos2d.h"
#include "../Common.h"
#include "../../scripting/lua/cocos2dx_support/CCLuaEngine.h"

class CLuaHelper
{
public:
	static CLuaHelper& getInstance();

public:
	int getHandler(const char* name);
	void registerHandler(const char* name, cocos2d::LUA_FUNCTION handler);

	void loadFile(const char* name);

	virtual ~CLuaHelper();

	CLuaHelper();

protected:
	cocos2d::CCDictionary mHandlers; // 所有注册的lua函数
};

#endif // _LUAHELPER_H_
